<!DOCTYPE html>
<html>

<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
<meta name="viewport"
	content="width=device-width, maximum-scale=1.0, initial-scale=1.0,initial-scale=1.0,user-scalable=no" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<title><#if systemConfig?? && systemConfig.title?? && systemConfig.title != ''>${systemConfig.title}<#else>中公高科客服-全渠道智能客服</#if></title>
<link rel="shortcut icon" type="image/x-icon" href="<#if systemConfig?? && systemConfig.favlogo?? && systemConfig.favlogo != ''>/res/image.html?id=${systemConfig.favlogo?url}<#else>/images/favicon.ico</#if>?t=${.now?long}"/>
<link rel="stylesheet" href="/css/layui.css">
<link rel="stylesheet" href="/css/login.css">
<script src="/layui.js"></script>
<script src="/js/jquery-1.10.2.min.js"></script>
</head>

<body class="login">
	<div class="login-box">
		<div class="login-logo">
			<a> <img src="<#if systemConfig?? && systemConfig.loginlogo?? && systemConfig.loginlogo != ''>/res/image.html?id=${systemConfig.loginlogo?url}<#else>images/logo2.png</#if>" style="height:60px;width:220px;">
			</a>
		</div>
		<!-- /.login-logo -->
		<div class="login-box-body">

			<p class="login-box-msg">注册账号</p>
			<form id="loginForm" action="/addAdmin.html" class="layui-form" method="post">
				<div class="form-group has-feedback" style="margin-bottom:10px;">
					<span class="kfont form-control-feedback">&#xe618;</span>
					<input name="username" id="username" autofocus required lay-verify="required"  
						class=" form-control required" value="" placeholder="用户名">
				</div>
				<div class="form-group has-feedback" style="margin-bottom:10px;">
					<span class="layui-icon form-control-feedback">&#xe612;</span> 
						<input name="mobile" id="mobile" autofocus required lay-verify="required"  
						class="form-control required" value="" placeholder="手机">
				</div>
				<div class="form-group has-feedback" style="margin-bottom:10px;">
					<span class="kfont form-control-feedback">&#xe618;</span>
					<input type="email" name="email" required lay-verify="required email"  placeholder="邮件地址" autocomplete="off" autocomplete="new-password" class=" form-control">
				</div>
				<div class="form-group has-feedback" style="margin-bottom:10px;">
					<span class="kfont form-control-feedback">&#xe618;</span>
					<input type="password" name="password" id="password" required lay-verify="required|pass"  
						class=" form-control required" autocomplete="new-password" value="" placeholder="密码">
				</div>
				<div class="row" style="margin-bottom:20px;padding:0 20px;">
					<div class="col-md-6"></div>
				</div>
				<div class="row" style="margin-bottom:20px;">

					<!-- /.col -->
					<div class="col-xs-12">
						<button class="btn btn-block btn-primary btn-lg" lay-submit  lay-filter="formDemo">注册</button>
					</div>
					<!-- /.col -->
					<div class="col-xs-12">
						 <p class="btm-text"><a href="/login.html">已有账号请登录</a></p>
					</div>
				</div>
			</form>
		</div>
		<!-- /.login-box-body -->
	</div>
</body>
<script language="javascript">
	if((window.frameElement && window.frameElement.id || '') != ""){
		top.location.href = "/register.html" ;
	}
	layui.use('layer', function(){
		  var layer = layui.layer;
		  <#if msg?? && msg == 'username_exist'>
			layer.alert('用户名存在，请重新填写', {icon: 2});
		  <#elseif msg?? && msg == 'email_exist'>
			layer.alert('邮件存在，请重新填写', {icon: 2});
			<#elseif msg?? && msg == 'mobile_exist'>
			layer.alert('手机存在，请重新填写', {icon: 2}); 
		  </#if>
		});  
	layui.use('form', function(){
		var form = layui.form();
		form.render(); //更新全部
		form.verify({
			pass: function(value, item){ //value：表单的值、item：表单的DOM对象
			    if(value && !(/^(?=.*[A-Za-z])(?=.*\d)[A-Za-z\d]{6,18}$/.test(value))){
			      return '密码由6到18位数字和字母组成';
			    }
			  }
			}); 
	});

</script>
</html>
